use fs_protocol_lib::*;
use tonic::transport::Channel;
mod fs_protocol_lib;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let channel = Channel::from_static("http://[::1]:50051")
        .connect()
        .await?;
    let mut client = fs_protocol_lib_client::FsProtocolLibClient::new(channel);

    let login_request = LoginRequest {
        username: "alice".to_owned(),
        password: "pass123".to_owned(),
    };
    let response = client.login(login_request).await?.into_inner();
    println!("Login response: {:?}", response);

    let upgrade_request = UpgradeRequest {
        download: "https://example.com/my-package-1.0.tar.gz".to_owned(),
        name: "my-package".to_owned(),
    };
    let response = client.upgrade(upgrade_request).await?.into_inner();
    println!("Upgrade response: {:?}", response);

    Ok(())
}